// 2014-02-01 Tyrghen
//---------------------------------------------
// Usage:
//  [] call edt_fnc_;
//---------------------------------------------
// Purpose:
// 
// 
// Parameters:
// - 
//
// Returns:
// 
//---------------------------------------------
// Objectif:
// 
//
// Paramètres:
// - 
//
// Renvoie:
// 
//---------------------------------------------

//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "editor\fn_delete.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;
private ["_element","_deleted"];
DEFAULT_PARAM(_element,0,"");
_deleted = "";
switch (true) do {
	case (IS_TRIGGER(_element) || IS_OBJECT(_element)): {
		deleteVehicle _element;
		_deleted = "Object or Trigger";
	};
	case (IS_GROUP(_element)): {
		_element call FFUNC(deleteGroup);
		_deleted = "Group";
	};
	case (AND_ALSO(IS_STRING(_element),IS_MARKER(_element))): {
		deleteMarker _element;
		_deleted = "Marker";
	};
};
if (_deleted != "" ) then {
	TRACE_1("Deleted",_deleted);
} else {
	TRACE("End");
};
TMFPROFILERSTOP;